package com.atguigu.a_string;
/*
    == :
        比基本数据类型一定比 数值是否相同
        比引用数据类型一定比 地址值是否相同
 */
public class Test1 {
    public static void main(String[] args) {
        String str1 = "abc";//0001
        String str2 = "abc";//0001

        String str3 = new String("abc");//0x001
        String str4 = new String("abc");//0x002

        char[] chs = {'a','b','c'};
        String str5 = new String(chs);//0x003
        String str6 = new String(chs);//0x004

        System.out.println(str1 == str2);//true
        System.out.println(str1 == str3);//false
        System.out.println(str1 == str5);//false

        System.out.println(str3 == str4);//false
        System.out.println(str3 == str5);//false

        System.out.println(str5 == str6);//false

    }
}
